package com.zwh.modules.hzlog.listener;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.zwh.modules.hzlog.entity.EasyExcelReadDto;

/**
 * @author monkey
 * @date 2020/10/20 15:18
 **/
public class EasyExcelReadDtoListener extends AnalysisEventListener<EasyExcelReadDto> {
    private static final Logger LOGGER = LoggerFactory.getLogger(EasyExcelReadDtoListener.class);
    /**
     * 每隔5条存储数据库，实际使用中可以3000条，然后清理list ，方便内存回收
     */
    private static final int BATCH_COUNT = 5;
    List<EasyExcelReadDto> list = new ArrayList<EasyExcelReadDto>();

    @Override
    public void invoke(EasyExcelReadDto data, AnalysisContext context) {

    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {

    }
}
